package com.itheima.manager;

import com.itheima.service.mongo.MovementService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class MovementManager {
    @DubboReference
    MovementService movementService;

    public ResponseEntity reject(List<ObjectId> objectIds) {
        movementService.reject(objectIds);
        return ResponseEntity.ok("操作成功");
    }

    public ResponseEntity pass(List<ObjectId> objectIds) {
        movementService.pass(objectIds);
        return ResponseEntity.ok("操作成功");
    }
}
